home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 1 (Walnut Creek)
/
Aminet - June 1993 [Walnut Creek].iso
/
usenet
/
sources
/
volume90
/
util
/
snap_1_4
/
part01
/
source
/
rexx.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-02-11
|
847b
|
56 lines
/* Auto: make
*/
#ifdef SNAPREXX
#include "minrexx.h"
IMPORT struct SnapRsrc *SnapRsrc;
VOID rexxprepend(), rexxappend();
int disp();
struct rexxCommandList rcl[] = {
{ "prepend", (APTR)&rexxprepend },
{ "append", (APTR)&rexxappend },
{ NULL, NULL }
};
char result[17];
int disp(msg, dat, p)
register struct RexxMsg *msg ;
register struct rexxCommandList *dat ;
char *p ;
{
result[0] = '\0';
((int (*)())(dat->userdata))(msg, p) ;
replyRexxCmd(msg, 0L, 0L, &result[0]);
return 1;
}
VOID pend(addr, p)
char *addr;
char *p;
{
strcpy(&result[0], addr);
if (*p) {
strncpy(addr, p + 1, 16);
}
}
VOID rexxprepend(msg, p)
struct RexxMsg *msg ;
char *p ;
{
pend(&SnapRsrc->Prepend[0], p);
}
VOID rexxappend(msg, p)
struct RexxMsg *msg ;
char *p ;
{
pend(&SnapRsrc->Append[0], p);
}
#endif